package com.zzyl.nursing.job.deviceDataQuery;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.nursing.service.IDeviceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;



@Component
@Slf4j
public class QueryDevicePropertyStatusJob {

    @Autowired
    private ApplicationContext applicationContext;

    public void queryDevicePropertyStatus(String iotId) {

        // 从容器获取代理对象
        IDeviceService proxyService = applicationContext.getBean(IDeviceService.class);

        AjaxResult result = proxyService.queryDevicePropertyStatus(iotId);
        log.info("设备数据更新成功");
    }
}

